<!DOCTYPE html>
<html>

	<head>

		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<title>工单列表</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<link rel="shortcut icon" href="favicon.ico">
		<link href="__STATIC__/css/bootstrap.min.css" rel="stylesheet">
		<link href="__STATIC__/css/font-awesome.css" rel="stylesheet">
		<link href="__STATIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
		<link href="__STATIC__/css/animate.css" rel="stylesheet">
		<link href="__STATIC__/css/style.css" rel="stylesheet">
		<style>
			.dropdown-menu {
				width: 70px;
				min-width: 70px;
				border-radius: 5px;
			}
			
			.dropdown-menu>li>a {
				margin: 0;
			}
			
			#ov {
				display: inline-block;
				max-height: 70px;
				overflow: hidden;
			}
			.ch{display: block;width: 300px;height: 38px;overflow: hidden;float: left;}
			.cd{display: block;float: left;color: blue!important;line-height: 38px;}
		</style>
	</head>

	<body class="fixed-sidebar full-height-layout gray-bg  pace-done">
		<include file="Public/left" title="left" />
		<div id="wrapper">
			<div id="page-wrapper" class="gray-bg dashbard-1" style="height: auto;">
				<include file="Public/top" title="top" />
				<div class="row border-bottom">
					<div class="col-sm-12 animated fadeInRight">
						<div class="mail-box-header">
							<h2><a href="{:U('jubao/index')}">所有工单</a></h2>
						</div>
						<div class="mail-box">
							<table class="table table-hover table-mail">
								<tbody>
									<tr>
										<th class="col-lg-1">ID</th>
										<th class="col-lg-2">用户</th>
										<th class="col-lg-1">问题分类</th>
										<th class="col-lg-1">提交时间</th>
										<th class="col-lg-2" style="text-align: center;">状态</th>
										<td class="col-lg-3">内容</td>
										<th class="col-lg-2">操作</th>
									</tr>
									<foreach name="member" item="v">
										<tr class="unread">
											<td>
												<input type="checkbox" class="i-checks" name="hobby[]" value="{$v.id}">{$v.id}
											</td>
											<td>{$v.userid|getName}</td>
											<td>{$v.typename}</td>
											<td>{$v.addtime}</td>
											<td style="text-align: center;">
												<if condition="$v.status eq 0"><span>等待回复</span>
													<else /><span style="color: green;">已回复</span></if>
											</td>
											<td>
												
													<span class="ch">{$v.desc}</span>
													<a href="javascript:;" class="cd">查看全部</a>
											</td>
											<td>
												<div class="input-group-btn">
													<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" style="background: #fc3d39;color: #FFFFFF;border-radius:5px;width: 70px;">操作 <span class="caret"></span>
                                            </button>
													<ul class="dropdown-menu">
														<li>
															<a href="{:U('ticket/update',array('id'=>$v['id']))}">回复</a>
														</li>
														<li>
															
														</li>
														</li>
													</ul>
												</div>
												<!--<a href="{:U('ticket/update',array('id'=>$v['id']))}" style="color: #337ab7;">回复</a>-->
											</td>

										</tr>
									</foreach>
								</tbody>
							</table>
							<div style="overflow:hidden;padding:20px 12px;">
							<span>

							</span>
							{$page}
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!-- 全局js -->
		<script src="__STATIC__/js/jquery.min.js"></script>
		<script src="__STATIC__/js/bootstrap.min.js"></script>

		<!-- 自定义js -->
		<script src="__STATIC__/js/content.js"></script>

		<!-- iCheck -->
		<script src="__STATIC__/js/plugins/iCheck/icheck.min.js"></script>
		<script>
			$(document).ready(function() {
				$('.i-checks').iCheck({
					checkboxClass: 'icheckbox_square-green',
					radioClass: 'iradio_square-green',
				});
				var checkAll = $('#quanxuan'); //全选的input
				var checkboxs = $('.i-checks'); //所有单选的input

				checkAll.on('ifChecked ifUnchecked', function(event) {
					if(event.type == 'ifChecked') {
						checkboxs.iCheck('check');
					} else {
						checkboxs.iCheck('uncheck');
					}
				});
				checkboxs.on('ifChanged', function(event) {
					if(checkboxs.filter(':checked').length == checkboxs.length - 1) {
						checkAll.prop('checked', true);
					} else {
						checkAll.prop('checked', false);
					}
					checkAll.iCheck('update');
				})

							$(".cd").click(function(){
    	if($(this).prev().height()==38){
    		$(this).prev().height(100);
    		$(this).text("收缩");
    		$(this).css({
    			"height":100+"px",
    			"line-height":100+"px"
    		})
    	   }else{
    		$(this).prev().height(38);
    		$(this).text("查看全部")
    		$(this).css({
    			"height":38+"px",
    			"line-height":38+"px"
    		})
    		}
    	})

			});
		</script>
	</body>

</html>